package org.sysdance.aplicativo.visao.tela.generica;

import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JDialog;
import javax.swing.JFrame;

public class Dialogo extends JDialog{

	private static final long serialVersionUID = 1L;
	
	public Dialogo(final JFrame janelaPai, final int width, final int height) {
		super(janelaPai,true);
		this.setSize(width, height);
		final Dimension tela = Toolkit.getDefaultToolkit().getScreenSize();
		int x = (int) ((tela.getWidth() -  getWidth()) / 2);
		int y = (int) ((tela.getHeight() - getHeight()) / 2);
		this.setLocation(x, y); 
		this.setResizable(false);
	}
	
}
